import { type RouteRecordRaw, createRouter, createWebHistory } from "vue-router";
import account from "../views/account/_account.vue";
const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/account",
  },
  {
    path: "/sys",
    redirect: "/sys/user",
  },
  {
    path: "/self",
    redirect: "/account",
  },
  {
    path: "/nursing",
    redirect: "/list_by_nurse",
  },
  {
    path: "/message",
    redirect: "/account",
  },
  {
    path: "/account",
    name: "account",
    component: account,
  },
  {
    path: "/dashboard",
    name: "dashboard",
    component: () =>
      import(
        /* webpackChunkName: "dashboard" */ "../views/dashboard/_index.vue"
      ),
  },
  {
    path: "/basicset",
    name: "basicset",
    component: () =>
      import(
        /* webpackChunkName: "basicset" */ "../views/account/_basicset.vue"
      ),
  },
  {
    path: "/sys/user",
    name: "userList",
    component: () =>
      import(/* webpackChunkName: "userList" */ "../views/sys/user/user_list.vue"),
  },
  {
    path: "/sys/log",
    name: "recordList",
    component: () =>
      import(/* webpackChunkName: "logList" */ "../views/sys/log/log_list.vue"),
  },
  {
    path: "/sys/menu",
    name: "menu",
    component: () =>
      import(/* webpackChunkName: "menu" */ "../views/sys/menu/menu_list.vue"),
  },
  {
    path: "/nursing_appointment/info/audit",
    name: "nursing_appointmentAudit",
    component: () => import(/* webpackChunkName: "nursing_appointmentAudit" */ "../views/nursing_appointment/info.vue")
  },
  {
    path: "/nursing_appointment/info/today",
    name: "nursing_appointmentToday",
    component: () => import(/* webpackChunkName: "nursing_appointmentToday" */ "../views/nursing_appointment/info_today.vue")
  },
  {
    path: "/nursing_appointment/info/accept",
    name: "nursing_appointmentAccept",
    component: () => import(/* webpackChunkName: "nursing_appointmentAccept" */ "../views/nursing_appointment/info_nurse.vue")
  },
  {
    path: "/nursing_appointment/info/assign",
    name: "nursing_appointmentAssign",
    component: () => import(/* webpackChunkName: "nursing_appointmentAssign" */ "../views/nursing_appointment/info_lender.vue")
  },
  {
    path: "/nursing_appointment/info/history",
    name: "nursing_appointmentHistory",
    component: () => import(/* webpackChunkName: "nursing_appointmentHistory" */ "../views/nursing_appointment/info_history.vue")
  },
  {
    path: "/nursing/nursing_appointment",
    name: "nursingAppointment",
    component: () => import(/* webpackChunkName: "nursingAppointment" */ "../views/nursing_appointment/index.vue")
  },
  {
    path: "/nursing/list_by_nurse_leader",
    name: "listByNurseLeader",
    component: () => import(/* webpackChunkName: "listByNurseLeader" */ "../views/nursing_appointment/list_by_nurse_leader.vue")
  },
  {
    path: "/nursing/list_by_nurse",
    name: "listByNurse",
    component: () => import(/* webpackChunkName: "listByNurse" */ "../views/nursing_appointment/list_by_nurse.vue")
  },
  {
    path: "/nursing/list_accept_by_nurse",
    name: "listAcceptByNurse",
    component: () => import(/* webpackChunkName: "listAcceptByNurse" */ "../views/nursing_appointment/list_accept_by_nurse.vue")
  },
  {
    path: "/history_by_nurse_leader",
    name: "historyByNurseLeader",
    component: () => import(/* webpackChunkName: "historyByNurseLeader" */ "../views/nursing_appointment/history_by_nurse_leader.vue")
  },
  {
    path: "/history_by_nurse",
    name: "historyByNurse",
    component: () => import(/* webpackChunkName: "historyByNurse" */ "../views/nursing_appointment/history_by_nurse.vue")
  },
  {
    path: "/editMenu",
    redirect: "/menu",
  },
  {
    path: "/sys/role",
    name: "rolelist",
    component: () =>
      import(/* webpackChunkName: "rolelist" */ "../views/sys/role/role_list.vue"),
  },
  {
    path: "/addRole",
    redirect: "/rolelist",
  },
  {
    path: "/updateRole",
    redirect: "/rolelist",
  },
  {
    path: "/suggestList",
    name: "suggestList",
    component: () =>
      import(
        /* webpackChunkName: "suggestList" */ "../views/suggest/suggest_list.vue"
      ),
  },
  {
    path: "/suggest",
    name: "suggest",
    component: () =>
      import(
        /* webpackChunkName: "suggest" */ "../views/suggest/add_suggest.vue"
      ),
  },
  {
    path: "/suggestInfo",
    name: "suggestInfo",
    component: () =>
      import(
        /* webpackChunkName: "suggestInfo" */ "../views/suggest/suggest_detail.vue"
      ),
  },
  {
    path: "/suggestSelfList",
    name: "suggestSelfList",
    component: () =>
      import(
        /* webpackChunkName: "suggestSelfList" */ "../views/suggest/suggest_self_list.vue"
      ),
  },
  {
    path: "/suggestSelfInfo",
    name: "suggestSelfInfo",
    component: () =>
      import(
        /* webpackChunkName: "suggestSelfInfo" */ "../views/suggest/suggest_self_detail.vue"
      ),
  },
  {
    path: "/C2CList",
    name: "C2CList",
    component: () =>
      import(/* webpackChunkName: "C2CList" */ "../views/account/account_group.vue"),
  },
  {
    path: "/",
    name: "index",
    component: () =>
      import(/* webpackChunkName: "index" */ "../views/index/index.vue"),
  },
  {
    path: "/sys/department",
    name: "department",
    component: () =>
      import(/* webpackChunkName: "department" */ "../views/sys/department/index.vue"),
  },//route
  /* add-router */
  {
    path: "/403",
    name: "403",
    component: () => import(/* webpackChunkName: "403" */ "../views/_403.vue"),
  },
  {
    path: "/:pathMatch(.*)",
    name: "404",
    component: () => import(/* webpackChunkName: "404" */ "../views/_404.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
